package com.example.firstdemo.network.api.user

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
enum class Gender {
    @SerialName("0")
    MALE,

    @SerialName("1")
    FEMALE,

    @SerialName("2")
    UNKNOWN
}

@Serializable
data class UserInfo(
//    val id: Int,
    val userId: Long,
    val userName: String,
    val nickName: String,
    val avatar: String,

    val deptId: Long,

    @SerialName("sex")
    val gender: Gender,

    @SerialName("phonenumber")
    val phoneNumber: String,
    val email: String,
//    val permissions: Array<String>,
//    val roles: String,
)

@Serializable
data class UserInfoResponse(
    val msg: String,
    val code: Int,
    val user: UserInfo
)
